package com.syz.aop;

//代理对象Proxy
public class MiShu implements IQianzi{
    private DongShiZhang dongShiZhang;

    public MiShu(DongShiZhang dongShiZhang) {
        this.dongShiZhang = dongShiZhang;
    }

    @Override
    public void qianzi() {
        //代理模式能实现调用目标对象之前或者之后加上一些额外的功能
        System.out.println("MiShu.qianzi 开启事物");
        System.out.println("MiShu.qianzi 前期审核");
        //...交给董事长签字
        dongShiZhang.qianzi();
        System.out.println("MiShu.qianzi 后期收尾");
        System.out.println("MiShu.qianzi 关闭事物");
    }
}
